﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Theme_3_CoursewareDescription :PowerCreator.LMS.Web.Base.WebBasePage
{
    PowerCreator.LMS.Web.Course.Course opCourse = new PowerCreator.LMS.Web.Course.Course();
    protected PowerCreator.LMS.Web.Config.WebConfig config = new PowerCreator.LMS.Web.Config.WebConfig();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string resourceid = Request.QueryString["ResourceID"].ToString();
            ViewState["ResourceID"] = resourceid;
            DataBinderPageData();
        }
    }
    protected override void InitPage()
    {
        base.InitPage();
    }

    private void DataBinderPageData()
    {
        PowerCreator.LMS.Course.Entity.VOTResource voResource = new PowerCreator.LMS.Course.Entity.VOTResource();
        voResource = opCourse.LoadResource(int.Parse(ViewState["ResourceID"].ToString()));
        if (voResource.ResourceID > 0)
        {
            this.Title = config.GetLanagerValueByKey("theme_CoursewareDescription_Title", PowerCreator.LMS.Language.LanagetItemType.Page);
            this.Title+= voResource.ResourceName;
            lbl_ResourceName.Text = voResource.ResourceName;
            lit_ResourceContent.Text = voResource.ResourceDescription;
        }
    }
}
